﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TransCend.Util.Page
{
    public interface IPage
    {
        /// <summary>
        /// 总记录数
        /// </summary>
        /// <returns></returns>
        int GetTotalCount();

        /// <summary>
        /// 总页数
        /// </summary>
        /// <returns></returns>
        int GetTotalPage();

        /// <summary>
        /// 每页记录数
        /// </summary>
        /// <returns></returns>
        int GetPageSize();

        /// <summary>
        /// 当前页号
        /// </summary>
        /// <returns></returns>
        int GetPageNo();

        /// <summary>
        /// 是否第一页
        /// </summary>
        /// <returns></returns>
        bool IsFirstPage();

        /// <summary>
        /// 是否最后一页
        /// </summary>
        /// <returns></returns>
        bool IsLastPage();

        /// <summary>
        /// 返回下页的页号
        /// </summary>
        /// <returns></returns>
        int GetNextPage();

        /// <summary>
        /// 返回上页的页号
        /// </summary>
        /// <returns></returns>
        int GetPrePage();
    }
}
